import {createApp} from 'vue'
import App from './App.vue'
import router from './router/index'
import 'animate.css';
import i18n from '@/i18n/index.js'
import {createPinia} from 'pinia'




const pinia = createPinia()

// 图标库
import Unicon from 'vue-unicons'
import {
    uniLayerGroupMonochrome,
    uniCarWash,
    uniBag,
    uniConstructor
} from 'vue-unicons/dist/icons'

Unicon.add([uniLayerGroupMonochrome,
    uniCarWash,
    uniConstructor,
    uniBag,])

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

/**  挂载全局事件总线   **/
import mitt from 'mitt';
window.$eventBus = mitt();

import Qs from 'qs'
window.$qs = Qs

import {gsap} from 'gsap'
window.$gs = gsap


// 引入layout
import VueGridLayout from 'vue-grid-layout'


// 后台APP
const app = createApp(App);
app.use(router)
app.use(Unicon)
app.use(i18n)
app.use(pinia)
app.use(VueGridLayout)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// app.config.globalProperties.$eventBus = mitt()
app.mount('#app')







